require("./requires");
var client_service = require("./client_service");
var room_service = require("./room_service");
var log4js = require('log4js');
var path = require('path');
var logConfig = require('./config/log4js')
log4js.configure(logConfig(path.dirname(__dirname)));

var configs = require(process.argv[2]);
var config = configs.hall_server();

var db = require('../utils/db');
db.init(configs.mysql());

// ???rediss
var redis = require('../utils/redis');

redis.init(configs.redis());

client_service.start(config);
room_service.start(config);